package com.yzkj.cpjxc.business.service;

import com.yzkj.cpjxc.business.framework.common.BusinessMap;
import com.yzkj.cpjxc.business.framework.common.Pager;
import com.yzkj.cpjxc.business.domain.SysUser;
import com.yzkj.cpjxc.business.domain.SysUserEditPassVo;
import com.yzkj.cpjxc.business.domain.SysUserQueryVo;

/**
 * 用户事务接口类
 */
public interface SysUserService {

	/**
	 * 获取查询分页对象
	 */
	public Pager<SysUser> search(Pager<SysUser> pager, SysUserQueryVo sysUser) throws Exception;

	/**
	 *  新增系统用户
	 */
	public BusinessMap create(SysUserQueryVo sysUser) throws Exception;

	/**
	 * 判断是否存在
	 */
	public boolean isExists(SysUser sysUser) throws Exception;

	/**
	 * 根据ID获取系统用户
	 */
	public SysUser getById(String sysUserId) throws Exception;

	/**
	 *  编辑系统用户
	 */
	public BusinessMap edit(SysUserQueryVo sysUser) throws Exception;

	/**
	 * 根据ID删除系统用户
	 */
	public BusinessMap delete(String sysUserId) throws Exception;

	/**
	 * 保存用户-角色的关系
	 */
	public BusinessMap setRole(SysUserQueryVo sysUserQueryVo) throws Exception;

	/**
	 * 登录
	 */
	public BusinessMap login(SysUser sysUser) throws Exception;

	/**
	 * 修改系统用户密码
	 */
	public BusinessMap changePass(SysUserEditPassVo vo) throws Exception;

	/**
	 * @description: 是否存在身份证号码
	 */
	public boolean isExistsIdCardNo(String IdCardNo) throws Exception;

	/**
	 * @description: 是否存在用户名
	 */
	public boolean isExistsUserName(String userName) throws Exception;

	/**
	 * 初始化管理员用户
	 */
	public void initData() throws Exception;

	public SysUser getSysUserByUsername(String username) throws Exception;

	/**
	 * @description: 获取部门下人员信息
	 */
	public boolean isHasUserByDept(String deptId) throws Exception;

	/**
	 * @description: 查看部门下的用户列表
	 */
	public Pager<SysUser> getUserByDeptId(Pager<SysUser> p, SysUserQueryVo queryVo) throws Exception;
	
	public Pager<SysUser> ajaxPageByRoleId(Pager<SysUser> p, SysUserQueryVo queryVo) throws Exception;
}
